﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace HelloWPF.RouteEvent
{
    /// <summary>
    /// Window1.xaml 的交互逻辑
    /// </summary>
    public partial class CallUserControl1Window : Window
    {
        public CallUserControl1Window()
        {
            InitializeComponent();
        }

        #region 隧道事件：从外到内
        private void StackPanel_PreviewTap(object sender, RoutedEventArgs e)
        {
            //1
            Debug.WriteLine("StackPanel_PreviewTap");
        }


        private void ToolBarUserControl_PreviewTap(object sender, RoutedEventArgs e)
        {
            //2
            Debug.WriteLine("ToolBarUserControl_PreviewTap");
        }
        #endregion

        #region 冒泡事件：从内到外
        private void ToolBarUserControl_Tap(object sender, RoutedEventArgs e)
        {
            //3
            Debug.WriteLine("ToolBarUserControl_Tap");
        }

        private void StackPanel_Tap(object sender, RoutedEventArgs e)
        {
            //4
            Debug.WriteLine("StackPanel_Tap");
        }
        #endregion


    }
}
